<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.01.
   家居公司管理员绑定信息模型($$)*/

!defined('Q_PATH') && exit;

class JiajucompanymasterModel extends CommonModel{

	static public function init__(){
		return array(
			'table_name'=>'jiajucompanymaster',
			'check'=>array(
				'jiajucompanymaster_username'=>array(
					array('max_length',50,Q::L('绑定会员帐号不能超过50个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanymaster_name'=>array(
					array('max_length',50,Q::L('管理员姓名不能超过50个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanymaster_msgmobile'=>array(
					array('empty'),
					array('mobile',Q::L('回拨电话号码格式错误','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanymaster_mobile'=>array(
					array('empty'),
					array('mobile',Q::L('管理员电话号码格式错误','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanymaster_msgmail'=>array(
					array('empty'),
					array('email',Q::L('提醒邮箱格式错误','__APPJIAJU_COMMON_LANG__@Model')),
					array('max_length',150,Q::L('提醒邮箱不能超过150个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
			),
		);
	}

	static function F(){
		$arrArgs=func_get_args();
		return ModelMeta::instance(__CLASS__)->findByArgs($arrArgs);
	}

	static function M(){
		return ModelMeta::instance(__CLASS__);
	}

	protected function beforeSave_(){
		$this->jiajucompanymaster_username=C::text($this->jiajucompanymaster_username);
		$this->jiajucompanymaster_name=C::text($this->jiajucompanymaster_name);
		$this->jiajucompanymaster_msgmobile=C::text($this->jiajucompanymaster_msgmobile);
		$this->jiajucompanymaster_mobile=C::text($this->jiajucompanymaster_mobile);
		$this->jiajucompanymaster_qq=C::text($this->jiajucompanymaster_qq);
		$this->jiajucompanymaster_msgmail=C::strip($this->jiajucompanymaster_msgmail);
		$this->jiajucompanymaster_msgqq=C::text($this->jiajucompanymaster_msgqq);
	}

}
